﻿using aier.business.logic;
using aier.dataaccess.model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;

namespace aier.wx.api.selfhost.Controllers
{
    //[Authorize]
    [RoutePrefix("api/Campain")]
    public class CampainController : ApiController
    {
        public CampainBll campainBll { get; set; }

        /// <summary>
        /// 获取所有的市场活动
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [Route("api/Campain/QueryAllCampain")]
        public IHttpActionResult QueryAllCampain()
        {
            List<CampainView> campains = campainBll.QueryAllCampain();

            return Ok<List<CampainView>>(campains);
        }


        public IHttpActionResult Post(string appointmentJson)
        {


            return null;
        }
    }
}
